<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
</head>

<body>
    <div id="app">
        <p>最后一项改为4：{{arr1}}</p>
        <p>name改为'李四'：{{arr2}}</p>
        <p>将删除数字6：{{arr3}}</p>
    </div>
    <script src="../dist/vue.js"></script>
    <script>
        // 数组响应式测试
        var vm = new Vue({
            data: {
                arr1: [1, 2, 3],
                arr2: [1, 2, { name: 'zs' }],
                arr3: [1, 2, 3, 4, 5, 6]
            }
        })
        vm.$mount('#app')
        setTimeout(() => {
            vm.arr1[2] = 4
            vm.arr2[2].name = '姓名'
            vm.arr3.pop()
        }, 2000);
    </script>
</body>

</html>